/*
 * Copyright (c) 2024 vitasystems GmbH
 *
 * This file is part of project EHRbase Migration Tool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ehrbase.migration.importer.v4.jooq.pg.tables.records;

import java.util.UUID;
import org.ehrbase.migration.importer.v4.jooq.pg.tables.CompData;
import org.jooq.Field;
import org.jooq.JSONB;
import org.jooq.Record13;
import org.jooq.Record2;
import org.jooq.Row13;
import org.jooq.impl.UpdatableRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes", "this-escape"})
public class CompDataRecord extends UpdatableRecordImpl<CompDataRecord>
        implements Record13<
                UUID,
                Integer,
                Integer,
                String,
                String,
                String,
                String,
                String,
                String,
                String,
                String,
                Integer,
                JSONB> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>ehr.comp_data.vo_id</code>.
     */
    public void setVoId(UUID value) {
        set(0, value);
    }

    /**
     * Getter for <code>ehr.comp_data.vo_id</code>.
     */
    public UUID getVoId() {
        return (UUID) get(0);
    }

    /**
     * Setter for <code>ehr.comp_data.num</code>.
     */
    public void setNum(Integer value) {
        set(1, value);
    }

    /**
     * Getter for <code>ehr.comp_data.num</code>.
     */
    public Integer getNum() {
        return (Integer) get(1);
    }

    /**
     * Setter for <code>ehr.comp_data.citem_num</code>.
     */
    public void setCitemNum(Integer value) {
        set(2, value);
    }

    /**
     * Getter for <code>ehr.comp_data.citem_num</code>.
     */
    public Integer getCitemNum() {
        return (Integer) get(2);
    }

    /**
     * Setter for <code>ehr.comp_data.rm_entity</code>.
     */
    public void setRmEntity(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>ehr.comp_data.rm_entity</code>.
     */
    public String getRmEntity() {
        return (String) get(3);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_concept</code>.
     */
    public void setEntityConcept(String value) {
        set(4, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_concept</code>.
     */
    public String getEntityConcept() {
        return (String) get(4);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_name</code>.
     */
    public void setEntityName(String value) {
        set(5, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_name</code>.
     */
    public String getEntityName() {
        return (String) get(5);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_attribute</code>.
     */
    public void setEntityAttribute(String value) {
        set(6, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_attribute</code>.
     */
    public String getEntityAttribute() {
        return (String) get(6);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_path</code>.
     */
    public void setEntityPath(String value) {
        set(7, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_path</code>.
     */
    public String getEntityPath() {
        return (String) get(7);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_path_cap</code>.
     */
    public void setEntityPathCap(String value) {
        set(8, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_path_cap</code>.
     */
    public String getEntityPathCap() {
        return (String) get(8);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_idx</code>.
     */
    public void setEntityIdx(String value) {
        set(9, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_idx</code>.
     */
    public String getEntityIdx() {
        return (String) get(9);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_idx_cap</code>.
     */
    public void setEntityIdxCap(String value) {
        set(10, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_idx_cap</code>.
     */
    public String getEntityIdxCap() {
        return (String) get(10);
    }

    /**
     * Setter for <code>ehr.comp_data.entity_idx_len</code>.
     */
    public void setEntityIdxLen(Integer value) {
        set(11, value);
    }

    /**
     * Getter for <code>ehr.comp_data.entity_idx_len</code>.
     */
    public Integer getEntityIdxLen() {
        return (Integer) get(11);
    }

    /**
     * Setter for <code>ehr.comp_data.data</code>.
     */
    public void setData(JSONB value) {
        set(12, value);
    }

    /**
     * Getter for <code>ehr.comp_data.data</code>.
     */
    public JSONB getData() {
        return (JSONB) get(12);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record2<UUID, Integer> key() {
        return (Record2) super.key();
    }

    // -------------------------------------------------------------------------
    // Record13 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row13<UUID, Integer, Integer, String, String, String, String, String, String, String, String, Integer, JSONB>
            fieldsRow() {
        return (Row13) super.fieldsRow();
    }

    @Override
    public Row13<UUID, Integer, Integer, String, String, String, String, String, String, String, String, Integer, JSONB>
            valuesRow() {
        return (Row13) super.valuesRow();
    }

    @Override
    public Field<UUID> field1() {
        return CompData.COMP_DATA.VO_ID;
    }

    @Override
    public Field<Integer> field2() {
        return CompData.COMP_DATA.NUM;
    }

    @Override
    public Field<Integer> field3() {
        return CompData.COMP_DATA.CITEM_NUM;
    }

    @Override
    public Field<String> field4() {
        return CompData.COMP_DATA.RM_ENTITY;
    }

    @Override
    public Field<String> field5() {
        return CompData.COMP_DATA.ENTITY_CONCEPT;
    }

    @Override
    public Field<String> field6() {
        return CompData.COMP_DATA.ENTITY_NAME;
    }

    @Override
    public Field<String> field7() {
        return CompData.COMP_DATA.ENTITY_ATTRIBUTE;
    }

    @Override
    public Field<String> field8() {
        return CompData.COMP_DATA.ENTITY_PATH;
    }

    @Override
    public Field<String> field9() {
        return CompData.COMP_DATA.ENTITY_PATH_CAP;
    }

    @Override
    public Field<String> field10() {
        return CompData.COMP_DATA.ENTITY_IDX;
    }

    @Override
    public Field<String> field11() {
        return CompData.COMP_DATA.ENTITY_IDX_CAP;
    }

    @Override
    public Field<Integer> field12() {
        return CompData.COMP_DATA.ENTITY_IDX_LEN;
    }

    @Override
    public Field<JSONB> field13() {
        return CompData.COMP_DATA.DATA;
    }

    @Override
    public UUID component1() {
        return getVoId();
    }

    @Override
    public Integer component2() {
        return getNum();
    }

    @Override
    public Integer component3() {
        return getCitemNum();
    }

    @Override
    public String component4() {
        return getRmEntity();
    }

    @Override
    public String component5() {
        return getEntityConcept();
    }

    @Override
    public String component6() {
        return getEntityName();
    }

    @Override
    public String component7() {
        return getEntityAttribute();
    }

    @Override
    public String component8() {
        return getEntityPath();
    }

    @Override
    public String component9() {
        return getEntityPathCap();
    }

    @Override
    public String component10() {
        return getEntityIdx();
    }

    @Override
    public String component11() {
        return getEntityIdxCap();
    }

    @Override
    public Integer component12() {
        return getEntityIdxLen();
    }

    @Override
    public JSONB component13() {
        return getData();
    }

    @Override
    public UUID value1() {
        return getVoId();
    }

    @Override
    public Integer value2() {
        return getNum();
    }

    @Override
    public Integer value3() {
        return getCitemNum();
    }

    @Override
    public String value4() {
        return getRmEntity();
    }

    @Override
    public String value5() {
        return getEntityConcept();
    }

    @Override
    public String value6() {
        return getEntityName();
    }

    @Override
    public String value7() {
        return getEntityAttribute();
    }

    @Override
    public String value8() {
        return getEntityPath();
    }

    @Override
    public String value9() {
        return getEntityPathCap();
    }

    @Override
    public String value10() {
        return getEntityIdx();
    }

    @Override
    public String value11() {
        return getEntityIdxCap();
    }

    @Override
    public Integer value12() {
        return getEntityIdxLen();
    }

    @Override
    public JSONB value13() {
        return getData();
    }

    @Override
    public CompDataRecord value1(UUID value) {
        setVoId(value);
        return this;
    }

    @Override
    public CompDataRecord value2(Integer value) {
        setNum(value);
        return this;
    }

    @Override
    public CompDataRecord value3(Integer value) {
        setCitemNum(value);
        return this;
    }

    @Override
    public CompDataRecord value4(String value) {
        setRmEntity(value);
        return this;
    }

    @Override
    public CompDataRecord value5(String value) {
        setEntityConcept(value);
        return this;
    }

    @Override
    public CompDataRecord value6(String value) {
        setEntityName(value);
        return this;
    }

    @Override
    public CompDataRecord value7(String value) {
        setEntityAttribute(value);
        return this;
    }

    @Override
    public CompDataRecord value8(String value) {
        setEntityPath(value);
        return this;
    }

    @Override
    public CompDataRecord value9(String value) {
        setEntityPathCap(value);
        return this;
    }

    @Override
    public CompDataRecord value10(String value) {
        setEntityIdx(value);
        return this;
    }

    @Override
    public CompDataRecord value11(String value) {
        setEntityIdxCap(value);
        return this;
    }

    @Override
    public CompDataRecord value12(Integer value) {
        setEntityIdxLen(value);
        return this;
    }

    @Override
    public CompDataRecord value13(JSONB value) {
        setData(value);
        return this;
    }

    @Override
    public CompDataRecord values(
            UUID value1,
            Integer value2,
            Integer value3,
            String value4,
            String value5,
            String value6,
            String value7,
            String value8,
            String value9,
            String value10,
            String value11,
            Integer value12,
            JSONB value13) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        value9(value9);
        value10(value10);
        value11(value11);
        value12(value12);
        value13(value13);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached CompDataRecord
     */
    public CompDataRecord() {
        super(CompData.COMP_DATA);
    }

    /**
     * Create a detached, initialised CompDataRecord
     */
    public CompDataRecord(
            UUID voId,
            Integer num,
            Integer citemNum,
            String rmEntity,
            String entityConcept,
            String entityName,
            String entityAttribute,
            String entityPath,
            String entityPathCap,
            String entityIdx,
            String entityIdxCap,
            Integer entityIdxLen,
            JSONB data) {
        super(CompData.COMP_DATA);

        setVoId(voId);
        setNum(num);
        setCitemNum(citemNum);
        setRmEntity(rmEntity);
        setEntityConcept(entityConcept);
        setEntityName(entityName);
        setEntityAttribute(entityAttribute);
        setEntityPath(entityPath);
        setEntityPathCap(entityPathCap);
        setEntityIdx(entityIdx);
        setEntityIdxCap(entityIdxCap);
        setEntityIdxLen(entityIdxLen);
        setData(data);
        resetChangedOnNotNull();
    }
}
